#include <iostream>
#include <vector>

using namespace std;

// empty() 测试向量是否为空   true为空，false不为空

int main()
{
    vector<int> v1;
    if (v1.empty())
    {
        cout << "v1 is empty" << endl;
    }
    else
    {
        cout << "v1 is not empty" << endl;
    }
    v1.push_back(1);
    v1.push_back(2);

    if (v1.empty())
    {
        cout << "v1 is empty" << endl;
    }
    else
    {
        cout << "v1 is not empty" << endl;
    }
}